{% extends 'myadmin/index.html' %}

{% block cont %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">订单列表</div>


                </div>
                <div class="widget-body  am-fr">
                    
                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>缩略图</th>
                                    <th>商品</th>
                                    
                                    <th>单价</th>
                                    <th>数量</th>
                                    <!-- <th>商品操作</th> -->
                                    <th>合计</th>
                                    <th>状态</th>
                                    <!-- <th>交易状态</th> -->
                                    <th>交易操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for i in uorderss %}
                                {% for m in i.orderinfo_set.all %}
                                <tr class="gradeX">
                                    <td><img src="{{m.gid.g_url}}" width="50"></td>
                                    <td>{{ m.gid.title }}</td>
                                    <td>{{m.gid.price}}</td>
                                    <td>{{m.num}}</td>
                                    <td>{{i.total}}</td>
                                    
                                    {% if i.status == 0 %}
                                    <td class="Mystatus">未支付</td>
                                    
                                    {% elif i.status == 1 %}
                                    <td class="Mystatus">支付成功</td>
                     
                                    {% endif %}
                                   
          
                                    <td>
                                        <div class="tpl-table-black-operation">
                                            <a href="{% url 'myadmin_orderedit' %}?uid={{i.id}}">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>
                                            <a href="{% url 'myadmin_orderdel' %}?uid={{i.id}}" class="tpl-table-black-operation-del delgoods">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                {% endfor %}
                                {% endfor %}
                                <!-- more data -->
                            </tbody>
                           
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">

                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                                <li ><a href="{% url 'myadmin_orderlist' %}?p=1&type={{request.GET.type}}&search={{request.GET.search}}">首页</a></li>

                                <li {% if page == 1 %} class="am-disabled" {% endif %}><a href="{% url 'myadmin_orderlist' %}?p={{page|add:-1}}&type={{request.GET.type}}&search={{request.GET.search}}">«</a></li>
                                {% for i in prange %}
                                <li {% if page == i %} class="am-active" {% endif %}><a href="{% url 'myadmin_orderlist' %}?p={{i}}&type={{request.GET.type}}&search={{request.GET.search}}">{{i}}</a></li>
                                {% endfor %}
                                <li {% if page == sumpage %} class="am-disabled" {% endif %}><a href="{% url 'myadmin_orderlist' %}?p={{page|add:1}}&type={{request.GET.type}}&search={{request.GET.search}}">»</a></li>

                                <li ><a href="{% url 'myadmin_orderlist' %}?p={{sumpage}}&type={{request.GET.type}}&search={{request.GET.search}}">尾页</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}